package main

import (
	"fmt"

	"gitee.com/linmaolin/goext"
)

func main() {
	dr, err := goext.NewDiskReader("data/t.hd")
	if err != nil {
		fmt.Printf("Failed to get disk reader, err: %v .\n", err)
		return
	}

	ext2, err := goext.LoadExt2(dr)
	if err != nil {
		fmt.Printf("Failed to load ext2, err: %v!\n", err)
	}

	roots, err := ext2.Ls("/")
	if err != nil {
		fmt.Println("Failed to list root path, err")
		return
	}
	fmt.Println(roots)
}
